﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace BDSim
{
    public partial class LoadEnvFile : Form
    {
        public LoadEnvFile()
        {
            InitializeComponent();
        }

        public string FileName = "";

        private void button1_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.Filter = "文本文件(*.txt)|*.txt";
            if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                this.FileName = ofd.FileName;
                int index = ofd.FileName.LastIndexOf('\\');
                textBox3.Text = ofd.FileName.Remove(0, index+1);
            }
        }

        private void LoadEnvFile_Load(object sender, EventArgs e)
        {
            int index = this.FileName.LastIndexOf('\\');
            textBox3.Text = this.FileName.Remove(0, index + 1);
        }

        private void button3_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
